package com.fanxuankai.boot.jenkins.autoconfigure;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author fanxuankai
 */
@ConfigurationProperties(prefix = JenkinsProperties.PREFIX)
public class JenkinsProperties {
    public static final String PREFIX = "fxk.jenkins";
    public static final String SERVICE_URI = PREFIX + ".service-uri";
    public static final String USERNAME = PREFIX + ".username";
    public static final String PASSWORD_OR_TOKEN = PREFIX + ".password-or-token";

    /**
     * Jenkins 地址，ex：http://localhost:8080/view/联调
     */
    private String serviceUri;
    /**
     * Jenkins 用户名
     */
    private String username;
    /**
     * Jenkins 密码或者 Token，推荐使用 Token，因为有些 API 需要 Token 才有权限
     */
    private String passwordOrToken;
    /**
     * 模板文件在 resources 下的路径，默认为 templates
     */
    private String templatePath = "templates";

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPasswordOrToken() {
        return passwordOrToken;
    }

    public void setPasswordOrToken(String passwordOrToken) {
        this.passwordOrToken = passwordOrToken;
    }

    public String getServiceUri() {
        return serviceUri;
    }

    public void setServiceUri(String serviceUri) {
        this.serviceUri = serviceUri;
    }

    public String getTemplatePath() {
        return templatePath;
    }

    public void setTemplatePath(String templatePath) {
        this.templatePath = templatePath;
    }
}
